﻿@model IEnumerable<WebUI.Models.QizSubject>
@{ var tm = Model.FirstOrDefault(); tm = tm != null ? tm : new WebUI.Models.QizSubject();}
<div class="absolutediv" style="width: 960px; position: absolute">
    <p>
        <table class="width noborder toolbox">
            <tr>
                <td>
                    <div class="icons icons-add">
                        @Ajax.ActionLink("新建随访单", "SFDEdit", new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('随访单');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })
                    </div>
                </td>
                @Html.Partial("SearchPartialLite", new { SearchAction = "SFDList" })
            </tr>
        </table>
    </p>
    <table class="width withhilighter" cellpadding="0" cellspacing="0">
        <tr>
            @*        <th>
            查看
        </th>*@
            <th>
                @Html.LabelFor(model => tm.ID)
            </th>
            <th>
                @Html.LabelFor(model => tm.Title)
            </th>
            <th>
                @Html.LabelFor(model => tm.Department)
            </th>
            <th>
                @Html.LabelFor(model => tm.Creator)
            </th>
            <th>
                @Html.LabelFor(model => tm.Owner)
            </th>
            <th>
                @Html.LabelFor(model => tm.StatusRef)
            </th>
            <th>
                @Html.LabelFor(model => tm.CreateTime)
            </th>
            <th>
                @Html.LabelFor(model => tm.ExpireTime)
            </th>
            <th>
                @Html.LabelFor(model => tm.Tag)
            </th>
            <th>
                @Html.LabelFor(model => tm.ActionInterval)
            </th>
            <th>
                操作
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Ajax.ActionLink(item.ID, "SftMingXiList", new { ID = item.ID, LoadingElementId="OnLoadingSpan",UpdateTargetId = "DetailOverlay" }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "SftMingXiView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnComplete = "$('#SftMingXiView').show('slide', { direction: 'right' },200)", OnFailure = "OnSiteError" })
                </td>
                @*            <td>
                @Html.DisplayFor(modelItem => item.ID)
            </td>*@
                <td>
                    @Html.DisplayFor(modelItem => item.Title)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Department.DepName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Creator.UserName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Owner.UserName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.StatusRef.OptionTitle)
                </td>
                <td>
                    @item.CreateTime.ToString("yyyy-MM-dd")
                </td>
                <td>
                    @item.ExpireTime.ToString("yyyy-MM-dd")
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Tag)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ActionInterval) 天
                </td>
                <td>
                    @Ajax.ActionLink("修改", "SFDEdit", new { ID = item.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('医生信息');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })
                    @Ajax.ActionLink("删除", "SFDDelete", new { ID = item.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "ListView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError", Confirm = OnConfirmDel() })
                    @Html.ActionLink("预览", "QizSessionEdit", new { SubjectID = item.ID, PreviewOnly = true, _newpage = "true" }, new { Target = "_blank" })
                </td>
            </tr>
        }
    </table>
    <div id="SftMingXiView" style="float: left; display: none; position: absolute; left: 220px;
        top: 0px; height: 520px; width: 725px; border: 7px solid #535353; background-color: white;">
        ...
    </div>
</div>
@Html.Partial("TrHilighter", new ViewDataDictionary { { "hitabselector", ".withhilighter" } })